﻿function optview_onopen() {
	setDefault();
	loadSettings();
}

function loadSettings(){
	victim.value=options.getValue("victim");
	chooseImage(options.getValue("vicpic"));
	setRadio(true);
	curalf.value=options.getValue("alfinete");
}
function saveSettings(){
	options.putValue("victim",victim.value);
	options.putValue("vicpic",img_choose.src);
	options.putValue("showsign",showsign);
	options.putValue("alfinete",curalf.value);
}
function setRadio(load){
	if (load){
		showsign=options.getValue("showsign");
		eval(showsign+'.value=true');
	}else{
		var source = event.srcElement;
		if (source.value) {
			showsign=source.name;
		}
	}
}
function erase(){
	//Erase all pins
	alfinete="";
	curalf.value="";
}
function predefine(code) {
	curalf.value=code;
}
